﻿
#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using MarketPulse.BusinessLogic.Common;

#endregion

namespace MarketPulse.BusinessLogic.Private.StateMachine
{
    [Serializable]
    internal class VisitStateReleased : VisitStateBase
    {
        internal VisitStateReleased(bool throwIfInvalid)
            : base(throwIfInvalid)
        {
            mVisitStateType = VisitStatusTypeList.Released;
            InitVisitStateString();
        }

        public override bool Assign(IVisitStateContext state, bool tryTransition, Guid userGuid, DateTime plannedDateTime)
        {
            if (!tryTransition)
            {
                state.SetState(new VisitStateAssigned(mThrowIfInvalid));
            }
            return true;
        }
    }
}
